home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
afloat.zip
/
LDIV10.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-03-16
|
721b
|
43 lines
PAGE ,132
;-------------------------------------------------------
; LDIV10
;
; Copyright Bob Kline 1988
;
; Purpose:
; divide doubleword value by 10
;
; Input:
; DX:AX contain dividend on entry
;
; Output:
; DX:AX contain quotient on exit
; BX contains remainder (0 - 9)
;
; Other registers affected:
; CX
;-------------------------------------------------------
PUBLIC LDIV10
.MODEL SMALL
.CODE
LDIV10 PROC
MOV CX,10
XCHG DX,AX
PUSH DX
XOR DX,DX
DIV CX
XCHG AX,BX
POP AX
DIV CX
XCHG BX,DX
RET
LDIV10 ENDP
END